@foreach($list as $value)
    <tr data-id="{{$value['parent_id']??0}}">
        <td>
            <label class="checkbox-inline">
                @component('backend::component.checkbox')
                    @slot('name') id[] @endslot
                    @slot('class') id @endslot
                    @slot('value') {{$value['id']}} @endslot
                @endcomponent
            </label>
        </td>
        <td>
            @if($value['parent_id']>0)
                <i class="block-span block-span-{{count(str2arr($value['parent_ids']))*25}}"></i>
            @endif
            <i class="hcl {{$value['icon']}} font-weight-bold" style="margin-right: 5px;"></i>{{$value['title']}}
        </td>
        <td>{{$value['sort']}}</td>
        <td>
            @component("backend::component.switch")
                @slot('params'){"url":"{{route('b_Menu_switchMenu',['menu_id'=>$value['id']])}}","method":"post"} @endslot
                @slot('checked') @if($value['status'] == 1) checked @endif @endslot
            @endcomponent
        </td>
        <td>
            <a href="{{route('b_Menu_editMenu',['menu_id'=>$value['id']])}}"
                    data-params='{"area":"60%,60%","title":"编辑{{$value['title']}}"}'
                    class="btn btn-info btn-sm modal-box">编辑
            </a>
            <a href="{{route('b_Menu_addMenus',['parent_id'=>$value['id']])}}"
               class="btn btn-info btn-sm">添加子菜单
            </a>
            <button url="{{route('b_Menu_deleteMenus',['menu_id'=>$value['id']])}}"
                    data-params='{"method":"post","confirm":"true"}'
                    class="btn btn-danger btn-sm btn-ajax">删除
            </button>
        </td>
    </tr>
    @if(isset($value['_child']))
        @include('backend::menu.child_menu',['list'=>$value['_child']])
   @endif
@endforeach